<script setup>
import {storeToRefs} from "pinia";
import {useCounterStore} from '@/store/useCounterStore'
import {getAction, postAction} from "@/api/manage";

defineProps({
  msg: {
    type: String,
    required: true
  }
})
const store = useCounterStore()
console.log(`useCounterStore`, useCounterStore);

const {count} = storeToRefs(store);
const {increment, decrement} = store
postAction("/sys/login", {
  "username": "admin",
  "password": "admin_12",
  "remember_me": true,
  "captcha": "gggg",
  "checkKey": 1727228700815,
  "platform": "1"
}).then((res) => {
  console.log(res)
})
</script>

<template>
  <el-row class="mb-4">
    <el-button>Default</el-button>
    <el-button type="primary">Primary</el-button>
    <el-button type="success">Success</el-button>
    <el-button type="info">Info</el-button>
    <el-button type="warning">Warning</el-button>
    <el-button type="danger">Danger</el-button>
    <el-button>中文</el-button>
  </el-row>

  <button type="button" @click="increment">increment count is: {{ count }}</button>
  <button type="button" @click="decrement">decrement count is: {{ count }}</button>
</template>

<style scoped>
a {
  color: #42b983;
}
</style>
